package com.awesome.todo;



public class Task {

	String name;
	String date;
	String address;
	String city;
	String state;
	String description;
	Long id;
	Long userId;
	Category type;
	Boolean completed = false;
	
	public enum Category {
		Personal, School, Work, NULL
	}

	public Task(Long id, String name, String date, String address, String city, String state, String description, String type,
			Long userId) {
		this.id = id;
		this.name = name;
		this.date = date;
		this.address = address;
		this.city = city;
		this.state = state;
		this.description = description;
		if (type == null) {
			this.type = Category.NULL;
		} else {
			this.type = Category.valueOf(type);
		}
		
		this.userId = userId;
	}

	public Task() {
		this(null, null, null, null, null, null, null, null, null);
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setDate(String date) {
		this.date = date;
	}
	
	public void setAddress(String address){
		this.address = address;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public void setState(String state) {
		this.state = state;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public void setType(String type) {
		this.type = Category.valueOf(type);
	}
	
	public boolean getCompleted()
	{
		return completed;
	}

	public String getName() {
		return name;
	}

	public String getDate() {
		return date;
	}

	public String getAddress(){
		return address;
	}
	public String getCity() {
		return city;
	}

	public String getState() {
		return state;
	}

	public String getDescription() {
		return description;
	}

	public Category getType() {
		return type;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;

	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
		
	}
	
	public void setCompleted(boolean completed)
	{
		this.completed = completed;
	}
}
